package com.gwd.task.services;

import com.gwd.task.model.CodeSubmitRecordDTO;
import com.gwd.task.model.PageUtils;
import com.gwd.task.model.TaskDTO;

import java.util.List;

/**
 * @author zhiyongming
 * @date 2020/11/9 9:57
 */
public interface TaskServer {
    PageUtils findByPage(TaskDTO dto, PageUtils page);

    List<TaskDTO> findByModuleIdList(List<Long> ids);

    List<TaskDTO> findAllById(List<Long> ids);

    TaskDTO findById(Long taskId);

    List<TaskDTO> findByUserIdListAndUnClose(List<Long> ids);

    TaskDTO start(Long taskId, Long userId);

    void reStart(Long taskId, Long userId);

    void submit(Long taskId, Long userId, CodeSubmitRecordDTO csrDTO);

    void test(Long taskId, Long userId);

    void finish(Long taskId, Long userId);

    void cancel(Long taskId, Long userId);

    void block(Long taskId, Long userId, String describe);

    void save(TaskDTO dto, Long id);

    void remove(Long id);

    void board(List<Long> ids);
}
